#assembler 
NASM := nasm 

#nasm options 
ELF_FORMAT := -f elf 

#sources,objects 
sources := $(wildcard *.asm)  
objects := $(patsubst %.asm,%.o,$(sources))

#phony target
.PHONY:mm_all $(objects) mm_clean

mm_all:$(objects)

#assemble
SHELL := /bin/bash
$(objects):$(sources)
	for i in $(sources);do \
	$(NASM) $(ELF_FORMAT) $$i; \
	done

#phony target 
mm_clean: 
	-rm $(objects) 
